package commands

type AllOpenCommand struct {
	openCommands []Command
}

func CreateAllOpenCommand(openCommands []Command) *AllOpenCommand {
	return &AllOpenCommand{openCommands: openCommands}
}

func (aoc *AllOpenCommand) Execute() {
	for _, com := range aoc.openCommands {
		com.Execute()
	}
}

func (aoc *AllOpenCommand) Undo() {
	for _, com := range aoc.openCommands {
		com.Undo()
	}
}
